<?php
ob_start();
session_start();
include_once("includes/user.php");
if (isset($_POST['bt_login'])) {
    $username = $_POST['txt_username'];
    $password = $_POST['txt_password'];
    
    $check = checkUserPassword($username, $password);
    if ($check)
	{
		$_SESSION['user'] = $username;
		header('location:index.php?p=index');
	}
    else 
	{
		header('location:index.php?p=login');
	}
}
?>